package com.superpai.api;

import com.superpai.common.Constants;
import com.superpai.request.shop.GetSellerMarketActiveRequest;
import com.superpai.request.shop.GetShopCategoryListRequest;
import com.superpai.request.shop.GetShopInfoRequest;
import com.superpai.request.shop.GetShopPromotionListRequest;
import com.superpai.response.shop.GetSellerMarketActiveResponse;
import com.superpai.response.shop.GetShopCategoryListResponse;
import com.superpai.response.shop.GetShopInfoResponse;
import com.superpai.response.shop.GetShopPromotionListResponse;
import com.superpai.utils.DefaultClient;

/**
 * @author Devin.Hu
 * @date 2011-8-14
 * @version V1.0
 * @description 店铺api
 */
public class ShopAPI extends BaseAPI {
	
	/**
	 * 查询店铺信息
	 * 
	 * @param sellerUin
	 * @return
	 * @throws Exception
	 */
	public GetShopInfoResponse getShopInfo(int sellerUin) throws Exception{
		
		GetShopInfoRequest req = new GetShopInfoRequest();
		req.setSellerUin(sellerUin);
        DefaultClient client = new DefaultClient(Constants.shop_getShopInfo , true);
        GetShopInfoResponse response = client.execute(req);
  
        return response;
	}
	
	/**
	 * 询店铺分类列表
	 * 
	 * @param sellerUin
	 * @return
	 * @throws Exception
	 */
	public GetShopCategoryListResponse getShopCategoryList(int sellerUin) throws Exception{
		
		GetShopCategoryListRequest req = new GetShopCategoryListRequest();
		req.setSellerUin(sellerUin);
        DefaultClient client = new DefaultClient(Constants.shop_getShopCategoryList , true);
        GetShopCategoryListResponse response = client.execute(req);
  
        return response;
	}
	
	/**
	 * 查询店铺满减满送活动信息
	 * 
	 * @param sellerUin
	 * @return
	 * @throws Exception
	 */
	public GetSellerMarketActiveResponse getSellerMarketActive(int sellerUin) throws Exception{
		
		GetSellerMarketActiveRequest req = new GetSellerMarketActiveRequest();
		req.setSellerUin(sellerUin);
        DefaultClient client = new DefaultClient(Constants.shop_getSellerMarketActive , true);
        GetSellerMarketActiveResponse response = client.execute(req);
  
        return response; 
	}
	
	/**
	 * 查询店铺促销活动信息
	 * 
	 * @param sellerUin
	 * @return
	 * @throws Exception
	 */
	public GetShopPromotionListResponse getShopPromotionList(int sellerUin) throws Exception{
		
		GetShopPromotionListRequest req = new GetShopPromotionListRequest();
		req.setSellerUin(sellerUin);
        DefaultClient client = new DefaultClient(Constants.shop_getShopPromotionList , true);
        GetShopPromotionListResponse response = client.execute(req);
  
        return response; 
	}
}
